<template>
    <div class="form-dh">
        <cube-input
                class="input"
                v-model="input_value"
                placeholder='请输入兑换物品'
                @input="changeInput"
        >
        </cube-input>
    </div>
</template>

<script>
export default {
    name: "form-dh",
    data() {
      return {
          input_value: ''
      }
    },
    model: {
      prop: 'value',
      event: 'input'
    },
    props: {
        value: {
            type: Object,
            default() {
                return {}
            }
        }
    },
    watch: {
        value() {
            this.input_value = this.value.value
        }
    },
    mounted() {
        this.input_value = this.value.value
    },
    methods: {
        changeInput(value) {
            this.$emit('input',{value})
        }
    }
}
</script>
